export const SLOTH_TOKEN = '@SlothStore:accessToken_user'
class SlothStorage {
    async saveUser(value) {
        return await localStorage.setItem(SLOTH_TOKEN, JSON.stringify(value))
    }

    async getUser() {
        let s = await localStorage.getItem(SLOTH_TOKEN)
        return JSON.parse(s)
    }

    async removeUser() {
        await localStorage.removeItem(SLOTH_TOKEN)
    }
}

var storage = new SlothStorage()
export default storage
